if (sprite(the clickOn).loc = the mouseLoc) and (the clickOn <> spriteNum) then
if foundation[makesymbol(spriteNum)].getcardcount() = 1 then
if (getlist(the clickOn).rank = string(basecard)) and (getlist(the clickOn).suit = foundation[makesymbol(spriteNum)].getlastcard().suit) then
equal = 1
currentselect = spriteNum
end if
else
if (getlist(the clickOn).rankvalue = (foundation[makesymbol(spriteNum)].getlastcard().rankvalue + 1)) and (getlist(the clickOn).suit = foundation[makesymbol(spriteNum)].getlastcard().suit) then